<!DOCTYPE html>
<html   xmlns="http://www.w3c.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:p="http://primefaces.org/ui">
    <h:head>
        <script src="http://maps.google.com/maps/api/js?sensor=true|false" type="text/javascript"></script>
    </h:head>
    <h:body>
        
        <p:gmap center="41.381542, 2.122893" zoom="15" type="hybrid" style="width:600px;height:400px" />
        <br />
        <p:gmap center="41.381542, 2.122893" zoom="15" type="hybrid" style="width:600px;height:400px" model="#{gMapBean.model}"/>
        <br />
        
        <h:form prependId="false">   
            <p:growl id="growl" life="3000" showDetail="true" />

            <p:gmap id="gmap" center="36.890257,30.707417" zoom="13" type="HYBRID" style="width:600px;height:400px" model="#{gMapPolygon.polygonModel}">
                <p:ajax event="overlaySelect" listener="#{gMapPolygon.onPolygonSelect}" update="growl" />
            </p:gmap>
        </h:form>
    </h:body>
</html>
